package com.xq.exception;

import com.xq.vo.DataBaseEnum;

public class BusinessException extends RuntimeException {

    private final DataBaseEnum dataBaseEnum;

    public BusinessException(DataBaseEnum dataBaseEnum, DataBaseEnum dataBaseEnum1) {
        super(dataBaseEnum.getMessage());
        this.dataBaseEnum = dataBaseEnum1;
    }

    public BusinessException(DataBaseEnum dataBaseEnum,String message) {
        super(message);
        this.dataBaseEnum = dataBaseEnum;
    }

    public BusinessException(DataBaseEnum dataBaseEnum) {
        super(dataBaseEnum.getMessage());
        this.dataBaseEnum = dataBaseEnum;
    }

    public DataBaseEnum getDataBaseEnum() {
        return dataBaseEnum;
    }

}
